import { getGoodsCategories } from '@/api/goods'

export default {
  namespaced: true,
  state: {
    goodsCategories: [],
  },
  getters: {},
  mutations: {
    INITCATEGORIES(state, data) {
      state.goodsCategories = data
    },
  },
  actions: {
    async initCategories(context) {
      const res = await getGoodsCategories()
      // this.goodsCategories = res.data
      context.commit('INITCATEGORIES', res.data)
    },
  },
  modules: {},
}
